package priv.lirenhe.javasuper.thread.other;

public class Sleep {

	public Sleep() {
		System.out.println("Sleep init");
	}
	
	public static void main(String[] args) {
		Thread minP = new Thread(new TaskSleep(),"minP");
		Thread maxP = new Thread(new TaskSleep(),"maxP");
		
		//优先级的设置，只能大致地干预，具体的执行优先级不由我们干预
		minP.setPriority(Thread.MIN_PRIORITY);
		maxP.setPriority(Thread.MAX_PRIORITY);
		
		
		minP.start();
		maxP.start();
		/*try {
			int i = 0;
			while(true){
				System.out.println("======" + i);
				if(i%10 == 0){
					Thread.sleep(1000);
				}
				i++;
			}
		} catch (InterruptedException e) {
			e.printStackTrace();
		}*/
		
	}

}
